package com.cskaoyan.bean.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sun.media.sound.ModelMappedInstrument;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;


@Data
public class MallAdmin {

    private Integer id;

    @Length(min = 8, max = 25, message = "用户名长度在8-25之间")
    private String username;

    @Length(min = 6, max = 18, message = "密码长度在6-18")
    private String password;

    private String lastLoginIp;

    private Date lastLoginTime;

    private String avatar;

    private Date addTime;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;

    private Boolean deleted;

    @Size(min = 1, message = "请至少选择一个管理员角色")
    private Integer[] roleIds;

}